﻿<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/Site.Master" CodeBehind="ProjectMrgCoord.aspx.cs" Inherits="Timesheet.WebForm.Projects.ProjectMrgCoord" %>

<%@ Register Assembly="DevExpress.Web.v14.2, Version=14.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web" TagPrefix="dx" %>

<asp:Content runat="server" ID="BodyContent" ContentPlaceHolderID="MainContent">
    <div class="title">
        <dx:ASPxLabel ID="lblPrjMgrTitle" CssClass="maintitle" runat="server" Text="Project Details" Font-Size="22px" Font-Bold="true" ForeColor="#4A72A3">
        </dx:ASPxLabel>
    </div>
    <%--<dx:ASPxButton runat="server" ID="btnNewTeam" Font-Bold="True" Font-Overline="False" Text="New Team" OnClick="btnNewTeam_Click" CssClass="btnNewTeam"></dx:ASPxButton>--%>
    <div style="margin-left: 45px">
        <table style="width: 400px">
            <tr>
                <td>
                    <dx:ASPxLabel ID="ASPxLabel10" CssClass="titlelbb" runat="server" Text="Project Name" Font-Size="16px">
                    </dx:ASPxLabel>
                    <dx:ASPxLabel ID="lblProjectName" runat="server" Width="230px" Font-Size="16px">
                    </dx:ASPxLabel>
                </td>

            </tr>
            <tr>

                <td>
                    <dx:ASPxLabel ID="ASPxLabel9" CssClass="titlelbb" runat="server" Text="Customer" Font-Size="16px">
                    </dx:ASPxLabel>
                    <dx:ASPxLabel ID="lblCustomer" runat="server" Width="230px" Font-Size="16px">
                    </dx:ASPxLabel>
                </td>

            </tr>
            <tr> 
                <td>
                    <dx:ASPxLabel ID="ASPxLabel8" CssClass="titlelbb" runat="server" Text="Job#" Font-Size="16px">
                    </dx:ASPxLabel>
                    <dx:ASPxLabel ID="lblJob" runat="server" Width="230px" Font-Size="16px">
                    </dx:ASPxLabel>
                </td>

            </tr>
            <tr>
                <td>
                    <dx:ASPxLabel ID="ASPxLabel7" CssClass="titlelbb" runat="server" Text="Job Description" Font-Size="16px">
                    </dx:ASPxLabel>
                    <dx:ASPxLabel ID="lblJobDescription" runat="server" Width="230px" Font-Size="16px">
                    </dx:ASPxLabel>
                </td>

            </tr>
            <tr>
                <td>
                    <dx:ASPxLabel ID="ASPxLabel6" CssClass="titlelbb" runat="server" Text="Contract/P.O. #" Font-Size="16px">
                    </dx:ASPxLabel>
                    <dx:ASPxLabel ID="lblContact" runat="server" Width="230px" Font-Size="16px">
                    </dx:ASPxLabel>
                </td>

            </tr>
            <tr>
                <td>
                    <dx:ASPxLabel ID="ASPxLabel5" CssClass="titlelbb" runat="server" Text="Network Code" Font-Size="16px">
                    </dx:ASPxLabel>
                    <dx:ASPxLabel ID="lblNetwork" runat="server" Width="230px" Font-Size="16px">
                    </dx:ASPxLabel>
                </td>

            </tr>
            <tr>
                <td>
                    <dx:ASPxLabel ID="ASPxLabel11" CssClass="titlelbb" runat="server" Text="WBS #" Font-Size="16px">
                    </dx:ASPxLabel>
                    <dx:ASPxLabel ID="lblWbs" runat="server" Width="230px" Font-Size="16px">
                    </dx:ASPxLabel>
                </td>
            </tr>
            <tr>
                <td>
                    <dx:ASPxLabel ID="ASPxLabel3" CssClass="titlelbb" runat="server" Text="Resp. Person" Font-Size="16px">
                    </dx:ASPxLabel>
                    <dx:ASPxLabel ID="lblResp" runat="server" Width="230px" Font-Size="16px">
                    </dx:ASPxLabel>
                </td>
                <td>&nbsp;</td>
            </tr>
            <tr>
                <td>
                    <dx:ASPxLabel ID="ASPxLabel2" CssClass="titlelbb" runat="server" Text="Ticket" Font-Size="16px">
                    </dx:ASPxLabel>
                    <dx:ASPxLabel ID="lblTicket" runat="server" Width="230px" Font-Size="16px">
                    </dx:ASPxLabel>
                </td>

            </tr>
            <tr>
                <td>
                    <dx:ASPxLabel ID="lblActive" CssClass="titlelbb" runat="server" Text="Active" Font-Size="16px">
                    </dx:ASPxLabel>                    
                </td>

            </tr>
        </table>
    </div>

    <div class="title">
        <dx:ASPxLabel ID="ASPxLabel4" CssClass="maintitle" runat="server" Text="Teams" Font-Size="22px" Font-Bold="true" ForeColor="#4A72A3">
        </dx:ASPxLabel>
    </div>
    <div class="detail1">
        <dx:ASPxGridView
            ID="grvTeams"
            runat="server"
            EnableTheming="True"
            Theme="Office2010Silver"
            Style="margin-right: 0px"
            SettingsPager-PageSize="15"
            KeyFieldName="Id"
            Width="810px"
            OnRowUpdating="grvTeams_RowUpdating"
            OnRowInserting="grvTeams_RowInserting"
            AutoGenerateColumns="False" DataSourceID="dsTeams">
            <Columns>
                <dx:GridViewDataTextColumn FieldName="Id" VisibleIndex="0" Width="0" Visible="false" ReadOnly="true">
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataTextColumn FieldName="TeamName" Caption="Team Name" VisibleIndex="1" Name="TeamName" Width="150px" >
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataComboBoxColumn FieldName="LocationID" Name="LocationID" Caption="Job Location" VisibleIndex="3" Width="250px">
                    <PropertiesComboBox DataSourceID="dsRefLocations" TextField="RefNames" ValueField="RefID">
                        <Columns>
                            <dx:ListBoxColumn Caption="RefID" FieldName="RefID" Name="RefID" Visible="false" />
                            <dx:ListBoxColumn Caption="Location Name" FieldName="RefNames" Name="Location Name" />
                        </Columns>
                    </PropertiesComboBox>
                </dx:GridViewDataComboBoxColumn>
                <dx:GridViewDataComboBoxColumn FieldName="DesciplineID" Name="DesciplineID" Caption="Discipline" VisibleIndex="4" Width="200px">
                    <PropertiesComboBox DataSourceID="dsDisciplines" TextField="DisciplineName" ValueField="Id">
                        <Columns>
                            <dx:ListBoxColumn Caption="Id" FieldName="Id" Name="Id" Visible="false" />
                            <dx:ListBoxColumn Caption="DisciplineName" FieldName="DisciplineName" Name="Discipline Name" />
                        </Columns>
                    </PropertiesComboBox>
                </dx:GridViewDataComboBoxColumn>
                <dx:GridViewDataCheckColumn FieldName="Active" VisibleIndex="5" Width="80px">
                </dx:GridViewDataCheckColumn>
                <dx:GridViewCommandColumn Caption="Action" ShowDeleteButton="true" VisibleIndex="7" Width="130px" ShowEditButton="true" ShowNewButtonInHeader="True">
                </dx:GridViewCommandColumn>                
            </Columns>
            <Templates>
                <DetailRow>
                    <dx:ASPxGridView
                        ID="grvTeamDetails"
                        runat="server"
                        EnableTheming="True"
                        Theme="Office2010Silver"
                        Style="margin-right: 0px"
                        SettingsPager-PageSize="15"
                        OnRowInserting="grvTeamDetails_RowInserting"  OnRowUpdating="grvTeamDetails_RowUpdating"
                        OnBeforePerformDataSelect="grvTeamDetails_BeforePerformDataSelect"
                        KeyFieldName="Id"
                        Width="460px"
                        AutoGenerateColumns="False" DataSourceID="dsTeamDetails">
                        <Columns>
                            <dx:GridViewDataTextColumn FieldName="Id" VisibleIndex="0" UnboundType="Integer" Visible="false" ReadOnly="true">
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataComboBoxColumn FieldName="EmployerID" Name="EmployerID" Caption="Team Lead" VisibleIndex="1" Width="250px">
                                <PropertiesComboBox DataSourceID="dsEmployers" TextField="FullName" ValueField="Id">
                                    <Columns>
                                        <dx:ListBoxColumn Caption="Id" FieldName="Id" Name="Id" Visible="false" />
                                        <dx:ListBoxColumn Caption="FullName" FieldName="FullName" Name="User Name" />
                                    </Columns>
                                </PropertiesComboBox>
                            </dx:GridViewDataComboBoxColumn>
                            <dx:GridViewDataCheckColumn Caption="Active" FieldName="Active" Name="Active" Width="80px" VisibleIndex="2">
                            </dx:GridViewDataCheckColumn>
                            <dx:GridViewCommandColumn Caption="Action" VisibleIndex="3" ShowNewButtonInHeader="true" Width="130px" ShowDeleteButton="true" ShowEditButton="true">
                            </dx:GridViewCommandColumn>                            
                        </Columns>
                        <SettingsBehavior ColumnResizeMode="Disabled" ConfirmDelete="true" AllowFocusedRow="True" AllowSelectByRowClick="True" />
                        <SettingsPager PageSize="15"></SettingsPager>
                        <SettingsEditing Mode="Inline">
                        </SettingsEditing>
                        <Settings HorizontalScrollBarMode="Hidden" />

                        <SettingsCommandButton>
                            <UpdateButton ButtonType="Button">
                            </UpdateButton>
                            <NewButton ButtonType="Button">
                            </NewButton>
                            <CancelButton ButtonType="Button">
                            </CancelButton>
                            <DeleteButton ButtonType="Button">
                            </DeleteButton>
                            <EditButton ButtonType="Button">
                            </EditButton>
                        </SettingsCommandButton>
                        <Styles>
                            <Header HorizontalAlign="Center" Font-Size="Small">
                            </Header>
                            <AlternatingRow BackColor="#EDF5FF" Enabled="True">
                            </AlternatingRow>
                            <SelectedRow BackColor="#99CCFF">
                            </SelectedRow> 
                            <FocusedRow BackColor="#99CCFF">
                            </FocusedRow>
                            <Row Font-Size="11pt" Font-Names="Calibri">
                            </Row>
                        </Styles>
                    </dx:ASPxGridView>

                    <asp:ObjectDataSource ID="dsTeamDetails" runat="server"
                        DataObjectTypeName="Timesheet.Domain.TeamDetail"
                        SelectMethod="GetTeamDetails"
                        UpdateMethod="Update"
                        DeleteMethod="Delete"
                        InsertMethod="Add"
                        TypeName="Timesheet.Service.ITeamDetailService"
                        OnObjectCreating="dsTeamDetails_ObjectCreating">
                        <SelectParameters>
                            <asp:SessionParameter DefaultValue="-1" SessionField="teamID" Name="teamID" Type="Int64" />
                        </SelectParameters>
                    </asp:ObjectDataSource>

                    <asp:ObjectDataSource ID="dsEmployers" runat="server"
                        DataObjectTypeName="Timesheet.Domain.User"
                        SelectMethod="GetTeamLeads"
                        TypeName="Timesheet.Service.IUserService"
                        OnObjectCreating="dsEmployers_ObjectCreating">
                        <%--<SelectParameters>
                            <asp:QueryStringParameter DefaultValue="-1" Name="prjId" QueryStringField="id" Type="Int64" />
                        </SelectParameters>--%>
                    </asp:ObjectDataSource>

                </DetailRow>
            </Templates>
            <SettingsBehavior ConfirmDelete="true" ColumnResizeMode="Disabled" AllowFocusedRow="True" AllowSelectByRowClick="True" />
            <Settings HorizontalScrollBarMode="Hidden" />
            <SettingsPager PageSize="10"></SettingsPager>
            <SettingsEditing Mode="Inline">
            </SettingsEditing>           
            <SettingsDetail ShowDetailRow="true" AllowOnlyOneMasterRowExpanded="true" />
            <SettingsCommandButton>
                <UpdateButton ButtonType="Button">
                </UpdateButton>
                <CancelButton ButtonType="Button">
                </CancelButton>
                <EditButton ButtonType="Button">
                </EditButton>
                <DeleteButton ButtonType="Button">
                </DeleteButton>
                 <NewButton ButtonType="Button">
                </NewButton>
            </SettingsCommandButton>
            <Styles>
                <Header HorizontalAlign="Center" Font-Size="Small">
                </Header>
                <AlternatingRow BackColor="#EDF5FF" Enabled="True">
                </AlternatingRow>
                <SelectedRow BackColor="#99CCFF">
                </SelectedRow>
               
                <FocusedRow BackColor="#99CCFF">
                </FocusedRow>
                <Row Font-Size="11pt" Font-Names="Calibri">
                </Row>
            </Styles>
        </dx:ASPxGridView>

        <asp:ObjectDataSource
            ID="dsTeams"
            runat="server"
            DeleteMethod="Delete"
            InsertMethod="Add"
            UpdateMethod="Update"
            DataObjectTypeName="Timesheet.Domain.Team"
            SelectMethod="GetOrdersTeams"                  
            TypeName="Timesheet.Service.ITeamService"
            OnObjectCreating="dsTeams_ObjectCreating">
            <SelectParameters>
                <asp:QueryStringParameter DefaultValue="-1" Name="prjId" QueryStringField="id" Type="Int64" />
            </SelectParameters>
        </asp:ObjectDataSource>
        <asp:ObjectDataSource ID="dsRefLocations" runat="server"
            DataObjectTypeName="Timesheet.Domain.PrjReferences"
            DeleteMethod="Delete"
            InsertMethod="Add"
            SelectMethod="GetPrjReferences"
            TypeName="Timesheet.Service.IPrjReferencesService"
            UpdateMethod="Update"            
            OnObjectCreating="dsLocations_ObjectCreating">
            <SelectParameters>
                <asp:Parameter DefaultValue="1" Name="type" Type="String" />
                <asp:QueryStringParameter DefaultValue="-1" Name="prjId" QueryStringField="id" Type="Int64" />
            </SelectParameters>
        </asp:ObjectDataSource>

        <asp:ObjectDataSource ID="dsLocations" runat="server"
            DataObjectTypeName="Timesheet.Domain.Locations"
            DeleteMethod="Delete"
            InsertMethod="Add"
            SelectMethod="GetLocations"
            TypeName="Timesheet.Service.ILocationsService"
            UpdateMethod="Update"
            OnObjectCreating="dsLocations_ObjectCreating"></asp:ObjectDataSource>

        <asp:ObjectDataSource ID="dsDisciplines" runat="server"
            DataObjectTypeName="Timesheet.Domain.Disciplines"
            DeleteMethod="Delete"
            InsertMethod="Add"
            SelectMethod="GetDisciplines"
            TypeName="Timesheet.Service.IDisciplinesService"
            UpdateMethod="Update"
            OnObjectCreating="dsDisciplines_ObjectCreating"></asp:ObjectDataSource>
    </div>

</asp:Content>
<asp:Content ID="Content1" runat="server" ContentPlaceHolderID="head">
</asp:Content>

